import { Exclude, Transform } from "class-transformer";
import { Allow, IsIn } from "class-validator";
import { PageDto } from "src/common/dto/page.dto";
import { isNumberString } from "src/common/utils";

export class RolePageQuery extends PageDto {
    //关键字(角色名称/角色编码)
    // @IsString({message:'查询字段必须是字符串'})
    @Allow()
    keywords: string;

}

export class RolePageVo {

    id: number;
    name: string;
    code: string;
    status: number;
    sort: number;
    createTime: Date;
    updateTime: Date;

}

export class RoleBaseVo {

    // id: number;
    // name: string;
    // code: string;
    // status: number;
    // sort: number;
   
    id: number;
    name: string;
    code: string;
    status: number;
    @Exclude()
    deleted: number;
    sort: number;
    @Exclude()
    createTime: Date;
    @Exclude()
    updateTime: Date;

}